<?php
	require_once("Element.php");

	class Section{
		private $code = "";
		private $id = "";
		
		public function __construct($id){
			$this->id = $id;
		}
		
		public function setId($id){
			$this->id = $id;
		}
		
		public function getId(){
			return $this->id;
		}
		
		public function addHtmlCode($html){
			$this->code = $this->code.$html;
		}
		
		public function addElement($element){
			if($element instanceof Element){
				$this->code = $this->code . $element->getCode();
			}
		}
		
		public function printSection(){
			$this->code = "<div id='".$this->id."'>".$this->code."</div>";
			echo $this->code;
		}
	}
?>